// 导入：类型、接口、模块、组件、样式
import { Component } from "react";

import "../styled.scss";

class Index extends Component {
  render() {
    // [<h1>1</h1>, <h1>2</h1>, <h1>3</h1>]
    // const newarr = [1,2,3].map((item) => {
    //    return <h1>{item}</h1>
    // })
    // ----
    // const newarr = 后端数据数组里面是一个个对象.map(() => {
    //     return  <div className="film"></div>
    // })
    return (
      <>
        {new Array(20).fill(6).map((item, i) => {
          return (
            <div className="film" key={i}>
              <img
                src="https://static.maizuo.com/pc/v5/usr/movie/b16225b07bb1789563e35c42c3a32959.jpg?x-oss-process=image/quality,Q_70"
                alt=""
                className="poster"
              />

              <div className="info">
                <div className="title">
                  野蛮人入侵<span>2D</span>
                </div>
                <div className="author">主演：杜乃强</div>
                <div className="time">上映时间：周二 8月4日</div>
              </div>

              <div className="buy">预购</div>
            </div>
          );
        })}
      </>
    );
  }
}
export default Index;
